'''
Created on Feb 27, 2012

@author: Johnathon
'''
import util
from Gates.Gate import Gate
from LineValues import Zero, One

class NotGate(Gate):
    '''
    classdocs
    '''


    def __init__(self, gateName, level, inputLines, outputLine):
        '''
        Constructor
        '''
        super(NotGate, self).__init__(gateName, level, inputLines, outputLine)
#        self.gateName = gateName
#        self.inputs = inputLine
#        self.level = level
#        self.output = outputLine
        
    def evaluate(self):
        if self.output is not None:
            self.output.driveValue(self.inputs[0].value.NOT())

    def getEquivalentFaults(self):
        faults = [[(self.inputs, Zero), (self.output, One)], [(self.inputs, One), (self.output, Zero)]]
        return faults

